#ifndef _BUILTINS_H_
#define _BUILTINS_H_

#include "ctree.h"
#include "hash.h"

typedef struct _alias_t {
  hash_t hash_header;
  char *alias;
} alias_t;

/* exported var */

extern hash_table_t *alias_table;

/* exported functions */

/*
 * cli_builtins_init - initialize all builtin commands
 *
 * return -1 on error, 0 on success.
 */
int cli_builtins_init(void);

/*
 * cli_builitins_fini - deinitialize all builtin commands
 */
void cli_builtins_fini(void);

/*
 * cli_builtins_run - exec desired builtin command
 *
 * @argc   arguments count of command
 * @argv   arguments list of command
 *
 * return command return value, or if no such comman exist, return -1
 */
int cli_builtins_run(int argc, char **argv);

#endif
